package com.example.shiwuyouproject.ui.fragment.my.activity.adapter

import android.util.Log
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.example.shiwuyouproject.R
import com.example.shiwuyouproject.net.http.Api
import com.example.shiwuyouproject.utils.GlideUtils

class RewardsAndHonorsAdapter(myData:MutableList<String>):BaseQuickAdapter<String, BaseViewHolder>(R.layout.item_rewardsandhonors,myData){
    override fun convert(holder: BaseViewHolder, item: String) {
            holder.setGone(R.id.imClose,item.isEmpty())
        Log.e("aa","-----------img==="+item)
            if(item.isNotEmpty()){
                GlideUtils.fangImgPortrait(mContext,holder.getView(R.id.myHeaderImg), item)
            }else{
                holder.setImageResource(R.id.myHeaderImg, R.mipmap.icon_add)
            }
        holder.addOnClickListener(R.id.myHeaderImg)
        holder.addOnClickListener(R.id.imClose)
        holder.setGone(R.id.imClose,item.isNotEmpty())
    }
}